package com.android.yinghebike.ui.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.android.yinghebike.R;

//导航页面-到达目的地
public class Nav_ArrivedView extends RelativeLayout {
    public Nav_ArrivedView(Context context) {
        super(context);
        this.context = context;
        initView(null);
    }

    public Nav_ArrivedView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.context = context;
        initView(attrs);
    }

    public Nav_ArrivedView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        initView(attrs);
    }

    Context context;
    public TextView tv_address, tv_exit;

    private void initView(AttributeSet attrs) {
        View.inflate(context, R.layout.view_nav_arrived, this);
        tv_address = findViewById(R.id.tv_address);
        tv_exit = findViewById(R.id.tv_exit);
    }

    public void setAddress(String text) {
        tv_address.setText(text);
    }

    public void setExitClick(OnClickListener clickListener) {
        tv_exit.setOnClickListener(clickListener);
    }

}
